from time import time

# 时间戳： 1970-1-1 0:0:0 到当前时间的秒数

def plus_test():
    t = time()
    s = ''
    for i in range(1000000):
        s += 'test'
    print(time() - t)


def join_test():
    t = time()
    li = []
    for i in range(1000000):
        li.append('test')
    s = ''.join(li)
    print(time() - t)

# + : 1.0778684616088867
plus_test()
# join: 0.15691637992858887
join_test()